package com.lingyi.schedulemanager.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lingyi.schedulemanager.pojo.Schedule;
import com.lingyi.schedulemanager.service.ScheduleService;
import com.lingyi.schedulemanager.mapper.ScheduleMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
* @author Administrator
* @description 针对表【schedule】的数据库操作Service实现
* @createDate 2024-04-12 09:31:55
*/
@Service
public class ScheduleServiceImpl extends ServiceImpl<ScheduleMapper, Schedule>
    implements ScheduleService{

    @Resource
    private ScheduleMapper scheduleMapper;
    @Override
    public boolean updateByUpdate(Schedule schedule) {
       if (schedule.getStatus() ==1){
           schedule.setStatus(0);
       }
       if (schedule.getStatus() ==0){
           schedule.setStatus(1);
       }
        return scheduleMapper.updateByUpdate(schedule);
    }
}




